/**
 * JimingLiu created the file at 2006-11-30 03:28:14
 * $Id$
 */
package jm.lib.collections.common;

/**
 * @author JimingLiu
 *
 */
public class IdName {
    private int id;
    private String name;
    
    /**
     * @return the id
     */
    public int getId() {
        return id;
    }
    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
    /**
     * Returns <code>true</code> if this <code>IdName</code> is the same as the o argument.
     *
     * @return <code>true</code> if this <code>IdName</code> is the same as the o argument.
     */
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null) {
            return false;
        }
        if (o.getClass() != getClass()) {
            return false;
        }
        IdName castedObj = (IdName) o;
        return ((this.id == castedObj.id) && (this.name == null
            ? castedObj.name == null
            : this.name.equals(castedObj.name)));
    }
    /**
     * Override hashCode.
     *
     * @return the Objects hashcode.
     */
    public int hashCode() {
        int hashCode = 1;
        hashCode = 31 * hashCode + id;
        hashCode = 31 * hashCode + (name == null ? 0 : name.hashCode());
        return hashCode;
    }
    /**
     * @generated by CodeSugar http://sourceforge.net/projects/codesugar */
    
    public String toString() {
        StringBuffer buffer = new StringBuffer();
        buffer.append("[IdName:");
        buffer.append(" id: ");
        buffer.append(id);
        buffer.append(" name: ");
        buffer.append(name);
        buffer.append("]");
        return buffer.toString();
    }


    
    
    
}
